Robotics 1.0 Lesson Plan
Lesson 1: Hello Circuit Python.

Purpose: Students will learn basic Python concepts like variables and conditional statements and use the MU Editor to program the Circuit Playground Express via UF2 firmware.

No. of Classes

1 - (Time : 1 Hour 30 minutes, Each group has a maximum of 2 children).

Materials Required
  • Computer with Python installed

  • Mu Editor (recommended) or any code editor

Prior knowledge

Basic computer operation knowledge.

Exercises

Exercise:1



Setting up the CPX for Circuit Python


  • Install the MU Editor(You can use any Editor like Visual studio,Notepad++,etc But Mu Editor is the recommended one)

    Click here to download and install the MU Editor.


  • Download latest firmware for CPX and install in board

    Click here to download the UF2 package.


  • Exercise:2



  • Print Statement


    Here are the instructions for that.

  • Exercise:3



    Introduction of Variables in python -

  • String Variables


    Follow these instructions to learn how to create and use string variables in Python.

  • Integer and Float Variables - Follow these instructions to practice working with numeric variables.


  • Updating a Variable - Follow these steps to experiment with updating variables in Python.


  • Teacher's Instruction
    1. Introduce Python syntax using examples on the board.
    2. Can variables be given any name? Ask the students to find out the rules on naming variables. Ask them to name a variable as 'continue' and see what happens in code
    3. Explain indentation rules in Python.
    4. Ask the students why they think indentation matters in Python whereas in html/css or javascript, it doesn't matter.
    5. Guide students to write and run each exercise in Mu Editor or another editor.
    6. Ask students to modify code samples to test understanding.
    7. Encourage sharing and discussion of results.
    8. x = 5
      y = 2.5
      z = "Hello"
      print(x + y)
      print(z + x)
      Ask students to run this code and observe what happens. Discuss the output - datatype of x+y, is z+x possible?